package com.atguigu.juc;
import java.util.concurrent.*;


class MyThread implements Callable<Integer>{


    @Override
    public Integer call() throws Exception {
        System.out.println("********come in here");
        return 1024;

    }
}

public class CallableDemo {

    public static void main(String[] args) throws ExecutionException, InterruptedException {
        MyThread myThread = new MyThread(); //
        FutureTask futureTask = new FutureTask(myThread);

        new Thread(futureTask).start();
        System.out.println(futureTask.get());
    }

}
